package com.bjmashibing.system;

import com.bjmashibing.system.huawei.domain.Person;
import com.bjmashibing.system.huawei.jdbc.SpringJdbcTemplate;
import com.bjmashibing.system.huawei.udp_cmd;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;

/**
 * @Classname Test
 * @Description TODO
 * @Date 2020/9/17/017 18:50
 * @Created by Administrator
 */
public class Test2 {
    private final static Logger logger = LoggerFactory.getLogger(Test2.class);

    @Test
    public void test() {

        Collection set = new HashSet();

        set.add(new Person("张三", 21));

        set.add(new Person("李四", 19));

        set.add(new Person("王五", 22));

        set.add(new Person("张三", 21));

        sop(set);

    }

    private static void sop(Collection set) {

        Iterator it = set.iterator();

        while (it.hasNext()) {

            Person p = (Person) it.next();

            logger.info(p.toString());

        }
    }
}



